package com.okq.entity;

import com.okq.entity.base.BaseEntity;
import org.hibernate.annotations.DynamicInsert;
import org.hibernate.annotations.DynamicUpdate;

import javax.persistence.*;
import java.io.Serializable;

/**
 * 描述 : 模块菜单表
 * 作者 : zdl
 * 日期 : 2017/6/27 16:53
 */
@Entity
@DynamicInsert
@DynamicUpdate
@Table(name = "tb_menu")
public class Menu extends BaseEntity implements Serializable {

    private static final long serialVersionUID = 2621157053559314248L;

    /**
     * 模块名称
     */
    @Column(name = "menuName", length = 100)
    private String menuName;
    /**
     * 菜单属性(首页跳转时用到)
     */
    @Column(name = "menuAttr", length = 20)
    private String menuAttr;
    /**
     * 父级模块Id
     */
    @Column(name = "parentId", length = 40)
    private String parentId;
    /**
     * 路径
     */
    @Column(name = "url", length = 150)
    private String url;
    /**
     * 备注
     */
    @Column(name = "remark", length = 300)
    private String remark;
    /**
     * 菜单图标
     */
    @Column(name = "icon", length = 50)
    private String icon;
    /**
     * 菜单级别（0：顶级菜单 1：一级菜单2：二级菜单）
     */
    @Column(name = "menuLevel")
    private Integer menuLevel;

    /**
     * 菜单排序
     */
    @Column(name = "orderIndex")
    private Integer orderIndex;
    /**
     * 菜单编码
     */
    @Column(name = "menuCode", length = 50)
    private String menuCode;

    @Transient
    private Boolean isSelected;// 当前模版是否被选中

    public String getMenuName() {
        return menuName;
    }

    public void setMenuName(String menuName) {
        this.menuName = menuName;
    }

    public String getMenuAttr() {
        return menuAttr;
    }

    public void setMenuAttr(String menuAttr) {
        this.menuAttr = menuAttr;
    }

    public String getParentId() {
        return parentId;
    }

    public void setParentId(String parentId) {
        this.parentId = parentId;
    }

    public String getUrl() {
        return url;
    }

    public void setUrl(String url) {
        this.url = url;
    }

    public String getRemark() {
        return remark;
    }

    public void setRemark(String remark) {
        this.remark = remark;
    }

    public String getIcon() {
        return icon;
    }

    public void setIcon(String icon) {
        this.icon = icon;
    }

    public Integer getMenuLevel() {
        return menuLevel;
    }

    public void setMenuLevel(Integer menuLevel) {
        this.menuLevel = menuLevel;
    }

    public Integer getOrderIndex() {
        return orderIndex;
    }

    public void setOrderIndex(Integer orderIndex) {
        this.orderIndex = orderIndex;
    }

    public String getMenuCode() {
        return menuCode;
    }

    public void setMenuCode(String menuCode) {
        this.menuCode = menuCode;
    }

    public Boolean getIsSelected() {
        return isSelected;
    }

    public void setIsSelected(Boolean isSelected) {
        this.isSelected = isSelected;
    }

}
